﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace EyFramework.SocketServer
{
    internal static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        private static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            if (args.Length > 0)
            {
                if (args[0].ToUpper() == "/SILENT")
                {
                    //Electron的插件，不启动托盘直接启动服务
                    StartSocketServer();
                    Application.Run();
                }
                else
                {
                    Application.Run(new FrmSchisServer());
                }
            }
            else
            {
                //创建托盘，显示托盘
                Application.Run(new FrmSchisServer());
            }
        }

        private static void StartSocketServer()
        {
            SchisSocetServer server = new SchisSocetServer();
            server.start();
        }
    }
}